package com.yanqu.road.server.manger.system;

import com.yanqu.road.entity.servercenter.ServerInfo;
import com.yanqu.road.server.GameServer;
import com.yanqu.road.server.manger.CheckConfigVersionMgr;
import com.yanqu.road.server.manger.CheckConfigVersionTask;
import com.yanqu.road.server.manger.ServerListMgr;
import com.yanqu.road.utils.ServerType;

public class GameCheckConfigVersionMgr extends CheckConfigVersionMgr {
    @Override
    public boolean reloadData() throws Exception {
        ServerInfo serverInfo = ServerListMgr.getServerInfo(GameServer.getInstance().getServerId());
        if (serverInfo != null) {
            addTask(new CheckConfigVersionTask(serverInfo.getChannelId(), serverInfo.getServerId(), ServerType.SERVER_GAME, GameServer.getInstance().getMgrList()));
        }
        return true;
    }
}
